<?php
ob_start(); 
@session_start();
include("config.php");
$db = new lg_mysql($host,$dbuser,$dbpass,$csdl);
include("func.php");
$THANHVIEN["id"] = 0;
include("z_includes/dem_online.php");
if (empty($act)) $act = "home";
if ( !in_array($act, array(
        'home','gioi_thieu','tin_tuc', 'tin_tuc_xem','lien_he','search', 'dich_vu', 'dich_vu_xem', 'he_thong_phong', 'he_thong_phong_xem'
    ) ) ) 
{
    $act = "home";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php include "z_includes/_html_head.php"; ?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head>
<body>
    <div id="wrapper-header" class="header-<?=$act?>">
        <div id="header">
            <div class="container">
                <a href="/"><h1 id="logo"><?=get_title()?></h1></a>
                <ul class="navbars list-no-style">
                    <li class="nav-item">
                        <a href="/" class="<?=($act=='home')?"nav-active":""?>">Trang chủ</a>
                    </li>
                    <li class="nav-item">
                        <a href="/<?=lg_string::get_link("gioi thieu")?>" class="<?=($act=='gioi_thieu')?"nav-active":""?>">Giới thiệu</a>
                    </li>
                    <li class="nav-item">
                        <a href="/<?=lg_string::get_link("he thong phong")?>" class="<?=($act=='he_thong_phong')?"nav-active":""?>">Hệ thống phòng</a>
                        <ul class="sub-navs">
                            <? $q = $db->query("SELECT * FROM cms_menu WHERE cat = 'he_thong_phong' AND hien_thi = 1 AND parent=0 ORDER BY thu_tu"); ?>
                            <? while ($r = $db->fetch($q)): ?>
                                <li>
                                    <a href="/he-thong-phong/<?=$r['id']?>/<?=lg_string::get_link($r['ten'])?>" title="<?=$r['ten']?>"><?=$r['ten']?></a>
                                    <?=get_cms_menu($db, $r['id'], 0, 'he-thong-phong')?>
                                </li>
                            <? endwhile; ?>
                        </ul>
                    </li>
                    <li class="nav-item">
                        <a href="/<?=lg_string::get_link("dich vu")?>" class="<?=($act=='dich_vu' || $act=='dich_vu_xem')?"nav-active":""?>">Dịch vụ</a>
                        <ul class="sub-navs">
                            <? $q = $db->query("SELECT * FROM cms_menu WHERE cat = 'dich_vu' AND hien_thi = 1 AND parent=0 ORDER BY thu_tu"); ?>
                            <? while ($r = $db->fetch($q)): ?>
                                <li>
                                    <a href="/dich-vu/<?=$r['id']?>/<?=lg_string::get_link($r['ten'])?>" title="<?=$r['ten']?>"><?=$r['ten']?></a>
                                    <?=get_cms_menu($db, $r['id'], 0, 'dich-vu')?>
                                </li>
                            <? endwhile; ?>
                        </ul>
                    </li>
                    <li class="nav-item">
                        <a href="/<?=lg_string::get_link("tin tuc")?>" class="<?=($act=='tin_tuc' || $act=='tin_tuc_xem')?"nav-active":""?>">Tin tức</a>
                        <ul class="sub-navs">
                            <? $q = $db->query("SELECT * FROM cms_menu WHERE cat = 'tin_tuc' AND hien_thi = 1 AND parent=0 ORDER BY thu_tu"); ?>
                            <? while ($r = $db->fetch($q)): ?>
                                <li>
                                    <a href="/tin-tuc/<?=$r['id']?>/<?=lg_string::get_link($r['ten'])?>" title="<?=$r['ten']?>"><?=$r['ten']?></a>
                                    <?=get_cms_menu($db, $r['id'], 0, 'tin-tuc')?>
                                </li>
                            <? endwhile; ?>
                        </ul>
                    </li>
                    <li class="nav-item">
                        <a href="/<?=lg_string::get_link("lien he")?>" class="<?=($act=='lien_he')?"nav-active":""?>">Liên hệ</a>
                    </li>
                    <div class="clearfix"></div>
                </ul>
            </div>
        </div>
        <?php include("z_includes/slide.php") ?>
    </div>

    <div id="wrapper-body">
        <div class="container">
            <? include("z_modules/".$act.".php"); ?>
            <div class="clearfix"></div>
        </div>
    </div>

    <div id="footer">
        <div class="container">
            <div class="copyright"><?=get_page("copyright")?></div>
            <ul class="social-links list-no-style">
                <li><a href="<?=get_bien("facebook")?>" target="_blank"><img src="/images/icons/icon-fb.png" alt=""></a></li>
                <li><a href="<?=get_bien("google")?>" target="_blank"><img src="/images/icons/icon-google.png" alt=""></a></li>
                <li><a href="<?=get_bien("twitter")?>" target="_blank"><img src="/images/icons/icon-tweet.png" alt=""></a></li>
            </ul>
            <div class="clearfix"></div>
        </div>
    </div>
<div class="thoangbao_mgs" >
  <div id="luu_result"></div>
</div>
</div>
</body>
</html>
